package logic

import (
	"context"
	"rent-ease/models/mysql"

	"rent-ease/rentrpc/internal/svc"
	"rent-ease/rentrpc/rentrpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type HouseListLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewHouseListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *HouseListLogic {
	return &HouseListLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *HouseListLogic) HouseList(in *rentrpc.HouseListRequest) (*rentrpc.HouseListResponse, error) {
	// todo: add your logic here and delete this line
	var house []mysql.House
	mysql.DB.Debug().Find(&house)
	return &rentrpc.HouseListResponse{
		List: nil,
	}, nil
}
